package com.ddwl.goods.job;

import com.ddwl.goods.service.bargain.BargainOrderService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author hemiaojun
 * @Date 2020/11/10 11:00
 */
@Component
public class BargainOrderJob {

    @Resource
    private BargainOrderService bargainOrderService;


    /**
     * 砍价订单过期修改状态
     * @param param
     * @return
     * @throws Exception
     */
    @XxlJob("changeExpiredStatus")
    public ReturnT<String> changeExpiredStatus(String param) throws Exception{
        XxlJobLogger.log("砍价订单过期修改状态任务");
        bargainOrderService.changeExpiredStatus();
        return ReturnT.SUCCESS;
    }

}
